import { createRouter, createWebHistory } from 'vue-router'
import Main from '@/views/Layout/Main.vue'
import User from '@/views/User/index.vue'
import Mall from '@/views/Mall/index.vue'
import Setting1 from '@/views/Setting/Setting1.vue'
import Setting2 from '@/views/Setting/Setting2.vue'

import Home from '@/views/Home/index .vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: Main,
      children: [
        {
          path: '',
          component: Home,
          alias: '/home',
        },
        {
          path: '/user',
          component: User,
        },
        {
          path: '/mall',
          component: Mall,
        },
        {
          path: '/page1',
          component: Setting1,
        },
        {
          path: '/page2',
          component: Setting2,
        },
      ],
    },
  ],
})

export default router
